Fix flaky SequentialAccess test with dynamic expected value#4224
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
paulmedynski
left a comment
There was a problem hiding this comment.
Great robustness change, just looking for some enduring documentation of the query that calculates the expected byte count.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4224 +/- ##
==========================================
- Coverage 65.99% 64.27% -1.72%
==========================================
Files 276 272 -4
Lines 42951 65784 +22833
==========================================
+ Hits 28344 42283 +13939
- Misses 14607 23501 +8894
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description: The SequentialAccess test in DataStreamTest.cs was asserting a hardcoded byte count (536198) for the result of SELECT * FROM orders FOR XML AUTO. This value was tied to a specific state of the Northwind database and would fail whenever the Orders table content differed across test environments or servers. Fix: Replace the hardcoded expected value with a dynamically computed baseline using a direct SQL query, independent of the C# APIs under test. -All 4 hardcoded assertions replaced with expectedTotal
Head branch was pushed to by a user without write access
dd967d3 to
6eb6437
Compare
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
@paulmedynski Can this be merged? |
|
@ShreyaLaxminarayan - We're preparing the 7.1.0 Preview 1 release from the main branch. Once that completes we have a bunch of PR waiting to be merged, including this one. |
Description:
The SequentialAccess test in DataStreamTest.cs was asserting a hardcoded byte count (536198) for the result of
SELECT * FROM orders FOR XML AUTO.This value was tied to a specific state of the Northwind database and would fail whenever the Orders table content differed across test environments or servers.
Fix:
Replace the hardcoded expected value with a dynamically computed baseline using a direct SQL query, independent of the C# APIs under test.
-All 4 hardcoded assertions replaced with expectedTotal